import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';

class MenuPage extends StatefulWidget{
  @override
  State<MenuPage> createState() {
      return new _MenuPageState();
  }
}

class _MenuPageState extends State<MenuPage>{

  final  avatar = "./assets/libingbing.jpg";

  @override
  Widget build(BuildContext context) {
      return Scaffold(
          appBar: AppBar(title: new Text("个人介绍"),),
          drawer: new Drawer(
            child: new ListView(
              children: <Widget>[
                new UserAccountsDrawerHeader(
                    accountName: new Text('Jason 卍 l',style: new TextStyle(fontSize: 20.0),),
                    accountEmail: new Text('247677296@qq.com',style: new TextStyle(fontSize: 20.0),),
                    currentAccountPicture:  new CircleAvatar(
                        backgroundImage: ExactAssetImage(avatar),
                    ),
                    decoration: new BoxDecoration(
                      image: new DecorationImage(
                          fit:BoxFit.fill,
                          image: ExactAssetImage('./assets/beijing.jpg')),
                    ),),
                new ListTile(
                  title: new Text('关于我',style: new TextStyle(fontSize: 16.0),),
                  trailing: new Icon(Icons.account_circle),
                  onTap: (){
                    Navigator.of(context).pop();
//                    Navigator.of(context).pushNamed('/aboutme');
                  }
                ),
                new ListTile(
                  title: new Text('教育历',style: new TextStyle(fontSize: 16.0),),
                  trailing: new Icon(Icons.book),
                  onTap: (){
                    Navigator.of(context).pop();
                    Navigator.of(context).pushNamed('/education');
                  },
                ),
                new ListTile(
                  title: new Text('工作历',style: new TextStyle(fontSize: 16.0),),
                  trailing: new Icon(Icons.work),
                  onTap: (){
                    Navigator.of(context).pop();
                    Navigator.of(context).pushNamed('/work');
                  },
                ),
                new ListTile(
                  title: new Text('技术栈',style: new TextStyle(fontSize: 16.0),),
                  trailing: new Icon(Icons.gavel),
                  onTap: (){
                    Navigator.of(context).pop();
                    Navigator.of(context).pushNamed('/technology');
                  },
                )
              ],
            ),
          ),
          body: Container(
            padding: EdgeInsets.all(10),
            child: SingleChildScrollView(
              child: Column(
                  children: <Widget>[
                  Image.asset('./assets/avatar.jpg',fit: BoxFit.fitWidth,height: 300.0,),
                  Padding(
                    padding: EdgeInsets.all(20.0),
                    child: new Text('''自我介绍：很平凡的一名程序员，平凡到我一直在想。上辈子我到底是多么的牛逼与优秀,才使我这辈子如此的平凡。。。但是我的内心却十分躁动，不想一直这样平凡的活下去。既然做了一名程序员，虽然只有万分之一的几率成为大神。但是至少我要向前往大神的道路上狂奔，哪怕是最后伤的体无完肤。逆水行舟，不进则退。GO.''',
                      softWrap: true,),
                  ),
                  Padding(
                    padding: EdgeInsets.fromLTRB(20.20, 0.0, 20.0, 1),
                    child: Align(
                      alignment: new FractionalOffset(0.0, 0.0),
                      child:new Text('''手机：15901227381''',textAlign: TextAlign.left,softWrap: false,) ,
                    ),
                  ),
                  Padding(
                    padding: EdgeInsets.fromLTRB(20.20, 0.0, 20.0, 1),
                    child: Align(
                      alignment: new FractionalOffset(0.0, 0.0),
                      child:new Text('''邮箱：247677296@qq.com''',textAlign: TextAlign.left,softWrap: false,) ,
                    ),
                  ),
                  Padding(
                    padding: EdgeInsets.fromLTRB(20.20, 0.0, 20.0, 1),
                    child: Align(
                      alignment: new FractionalOffset(0.0, 0.0),
                      child:new Text('''擅长：Java、Python、Vue、Flutter''',textAlign: TextAlign.left,softWrap: false,) ,
                    ),
                  ),
                ],
              ),
            )
          ),
      );
  }
}
